row = 0
while row <= 4:
    # 先打印空格
    space = 0
    while space <= 4 - row:
        print(" ", end="")
        space += 1
    # 再打印星号
    star = 0
    while star <= row:
        print("*", end="")
        star += 1
    print()
    row += 1